-- GENERATED SPELL FOR [Prophet of Akali] --


function spell0_29028(pUnit, Event) --@Akali\'s Immunity,Self--
pUnit:FullCastSpellOnTarget(52982,pUnit)
pUnit:RegisterEvent('Sorts_29028', 660, 1)
end

function spell1_29028(pUnit, Event) --@Akali\'s Ritual of Annihilation,Self--
pUnit:FullCastSpellOnTarget(52993,pUnit)
pUnit:RegisterEvent('Sorts_29028', 561, 1)
end

function spell2_29028(pUnit, Event) --@Akali\'s Stun,Self--
pUnit:FullCastSpellOnTarget(52989,pUnit)
pUnit:RegisterEvent('Sorts_29028', 589, 1)
end

function spell3_29028(pUnit, Event) --@Darting Flames,Self--
pUnit:FullCastSpellOnTarget(53496,pUnit)
pUnit:RegisterEvent('Sorts_29028', 500, 1)
end

function spell4_29028(pUnit, Event) --@Incinerate,n/a--
pUnit:FullCastSpellOnTarget(53493,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29028', 1500, 1)
end

function Sorts_29028(pUnit, Event)
local choix_sorts_29028 = math.random(0, 4)
if choix_sorts_29028 == 0 then
pUnit:RegisterEvent('spell0_29028', 1, 1)
end
if choix_sorts_29028 == 1 then
pUnit:RegisterEvent('spell1_29028', 1, 1)
end
if choix_sorts_29028 == 2 then
pUnit:RegisterEvent('spell2_29028', 1, 1)
end
if choix_sorts_29028 == 3 then
pUnit:RegisterEvent('spell3_29028', 1, 1)
end
if choix_sorts_29028 == 4 then
pUnit:RegisterEvent('spell4_29028', 1, 1)
end
end

function mob29028_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29028', math.random(1500, 3000), 1)
end

function mob29028_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29028_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29028_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29028, 1, 'mob29028_Action')
RegisterUnitEvent(29028, 2, 'mob29028_Leave')
RegisterUnitEvent(29028, 3, 'mob29028_Kill')
RegisterUnitEvent(29028, 4, 'mob29028_Die')
